<script setup lang='ts'>
//接受props
let props = defineProps(["modelValue",'namedText']);
//let $emit = defineEmits(['update:modelValue','update:namedText']);
let $emit = defineEmits();
const updateChild=(event)=>{
    $emit('update:modelValue',event.target.value)
}

const updateChildNamed=(event)=>{
    $emit('update:namedText',event.target.value)
}

</script>
<template>
    <div>
        <b>modelValue: </b>
        <input 
            type="text" 
            :value="modelValue"
            @input="updateChild"
        />
        <b>namedText: </b>
        <input 
            type="text" 
            :value="props.namedText"
            @input="updateChildNamed"
        />

    </div>
</template>
<style  scoped>
    
</style>